﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CastleOfTheDisillusioned.Location.Maps.Mountain {
	class UphillCell : Cell {
		public UphillCell(double X, double Y, double Width, double Height) {
			this.X = X;
			this.Y = Y;
			this.Width = Width;
			this.Height = Height;

			//Floor
			this.AddTileRow(0, Height - 1, (int)Width);

			//Mountains
			int Lastheight = 0;
			for (int x = 1; x < Width - 20; x++) {
				Lastheight += Program.Random.Next(2) + Program.Random.Next(2);
				this.AddTileColumn(x + 10, Height - Lastheight, Lastheight);
			}
			for (int i = 1; i < 11; i++) {
				this.AddTileColumn(Width - i, Height - Lastheight, Lastheight);
			}
		}
	}
}
